﻿<Window x:Class="P2.Cuberry.Modules.SimpleAccounting.FiFiscalYear.FiFiscalYearsNewFYDetailsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"  
    xmlns:basec="clr-namespace:P2.Cuberry.Framework.Helper;assembly=P2.Cuberry.Framework.Helper"    
            Icon="/P2.Cuberry;component/Images/CuberryIcon32.ico"
        Title="Peacequare Cuberry" Width="640" Height="480" 
        Background="{DynamicResource P2BackgroundBrush}" 
        Closing="Window_Closing"
        >

    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/P2.Cuberry.Framework.Layout;component/Styles/Styles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>

    <Grid>
        <Grid.Resources>
            <Image x:Key="SaveIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.FiFiscalYear;component/Images/save.png" />
            <Image x:Key="CancelIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.FiFiscalYear;component/Images/cancel.png" />
            <Image x:Key="ClosingIcon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.FiFiscalYear;component/Images/save.png" />

            <Image x:Key="Printer2Icon" Height="16" Width="16" Source="/P2.Cuberry.Modules.SimpleAccounting.FiFiscalYear;component/Images/printer2.png" />


        </Grid.Resources>


        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="40" />
            <RowDefinition Height="35" />
            <RowDefinition Height="*"/>
            <RowDefinition Height="35" />
        </Grid.RowDefinitions>

        <!-- Row 0 Start -->        
        <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" Content="{Translate DialogHeaderNewFY}" Style="{StaticResource P2DetailViewHeaderTextStyle}" />
        
        <Separator Margin="0,0,0,0" Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="3" VerticalAlignment="Bottom" Height="0"/>
        <!-- Row 0 End -->

        <!-- Row 1: Menu Start -->
        <Border  Grid.Row="1" Grid.Column="0"  Style="{StaticResource P2MenuBorderStyle}">
            <Menu Grid.Row="1" x:Name="menuMain" Style="{StaticResource P2MenuStyle}" >
                <MenuItem x:Name="SaveBtn"  InputGestureText="Ctrl+S" Header="{Translate SaveBtn}" Command="{Binding FiFiscalYearSaveCommand}"  Icon="{StaticResource SaveIcon}" Style="{StaticResource P2MenuItemStyle}" />
               
            </Menu>
        </Border>


        <!-- Row 1 End -->

        <!-- Row 2: All Fields -->
        <Border  Grid.Row="2" Grid.Column="0"  Style="{StaticResource P2ContentBorderStyle}">
            <Grid Grid.Row="2" Grid.Column="0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="604*"/>
                    <ColumnDefinition Width="0*" />
                </Grid.ColumnDefinitions>

                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                </Grid.RowDefinitions>

                              
                <Label Margin="35,86,0,0" Name="FiscalYearStartDateL" Content="{Translate FiscalYearStartDateL}" HorizontalAlignment="Left" Width="120" Height="28" VerticalAlignment="Top"></Label>                
                <DatePicker HorizontalAlignment="Left" Margin="35,106,0,0" Name="FiscalYearStartDate" SelectedDate="{Binding FiscalYearStartDate, Mode=TwoWay}" Width="106.47" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit" Height="24" VerticalAlignment="Top" />                

                
                <Label Name="FiscalYearEndDateL" Content="{Translate FiscalYearEndDateL}" Height="28" HorizontalAlignment="Left" Margin="161,86,0,0" VerticalAlignment="Top" Width="120" />
                <DatePicker Name="FiscalYearEndDate" HorizontalAlignment="Left" Margin="161,106,0,0" SelectedDate="{Binding FiscalYearEndDate, Mode=TwoWay}" Width="106.47" xmlns:my="http://schemas.microsoft.com/wpf/2008/toolkit" Height="24" VerticalAlignment="Top" />
                                
                <Label Margin="35,24,0,0" Name="FiscalYearNameL" Height="28" VerticalAlignment="Top" Content="{Translate NewFiscalYearNameL}" HorizontalAlignment="Left" Width="120"></Label>
                <TextBox Margin="35,42,0,0" Name="FiscalYearName" Height="23" Text="{Binding FiscalYearName, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" Style="{StaticResource P2TextBoxStyle}" VerticalAlignment="Top" HorizontalAlignment="Left" Width="232.47" />

                <Label Content="{Translate NoteL}" HorizontalAlignment="Right" Margin="0,24,177,0" Name="NoteL" Width="120" Height="23" VerticalAlignment="Top" />
                <TextBox IsReadOnly="{Binding NameReadOnly}" Margin="0,42,23,15" Name="Note" Style="{StaticResource P2TextBoxStyle}" Text="{Translate NoteTextL}" VerticalScrollBarVisibility="Auto" HorizontalAlignment="Right" Width="274" />
                
                
                <Label HorizontalAlignment="Left" Margin="35,146,0,0" Name="FiAccountNoPLL" Width="250" Content="{Translate FiAccountNoPLL}" Height="28" VerticalAlignment="Top"></Label>
                <TextBox  Margin="35,167,0,0" Name="FiAccountNoPL" Height="23" Width="120" Text="{Binding FiAccountNoPL, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left"  VerticalAlignment="Top" Style="{StaticResource P2TextBoxStyle}"/>
                <TextBox  Margin="35,196,0,0" Name="FiAccountNamePL" Width="250" Text="{Binding FiAccountNamePL, Mode=OneWay, ValidatesOnExceptions=True, NotifyOnValidationError=True, ValidatesOnDataErrors=True}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}"  HorizontalAlignment="Left" Style="{StaticResource P2TextBoxStyle}" IsEnabled="False" Height="23" VerticalAlignment="Top" />
                
                <Label Content="{Translate OpeningFiTransactionDescriptionL}" Height="28" HorizontalAlignment="Left" Margin="35,0,0,63" Name="OpeningFiTransactionDescriptionL" VerticalAlignment="Bottom" Width="232.47" />
                <TextBox Height="23" HorizontalAlignment="Left" Margin="35,0,0,50" Name="OpeningFiTransactionDescription" Style="{StaticResource P2TextBoxStyle}" Text="{Binding OpeningTransactionDescription}" Validation.ErrorTemplate="{StaticResource ErrorTemplate}" VerticalAlignment="Bottom" Width="232.47" />
            </Grid>
        </Border>

        <!-- Row 2: End -->


        <!-- Row 3: Bottom: Status Bar Start -->
        <Border Grid.Row="3" Grid.Column="0" Style="{StaticResource P2StatusStripBorderStyle}" >
            <Grid Grid.Row="3" Grid.Column="0" Style="{StaticResource P2StatusStripGridStyle}">
                <basec:P2StatusStrip x:Name="StatusStrip"  Grid.Column="0" Grid.Row="3" Height="Auto" Width="Auto" Background="White" HorizontalAlignment="Left" ContentStringFormat=""></basec:P2StatusStrip>
                <TextBox Name="Status" Grid.Column="0" Grid.Row="3" Height="Auto" Width="Auto" Background="White" HorizontalAlignment="Right" Text="{Binding StatusName, Mode=OneWay}" IsReadOnly="True" BorderBrush="Transparent" />
            </Grid>
        </Border>

        <!-- Row 3: End -->
    </Grid>
</Window>
